package atguigu.time;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Demo2 {
    public static void main(String[] args) {

        long time = 1687856531634L;

        DateTime date = DateUtil.date(time);
        System.out.println(date);


        Date date1 = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("YYYY-MM-dd");
        String format = sdf.format(date1);
        System.out.println(format);
    }
}
